package com.itheima.construtor;

public class Test2 {
    public static void main(String[] args) {
        //目标2：构造器的作用：创建对象时可以同时为对象赋值

        Girl g1 = new Girl();
        g1.name = "林志玲";
        g1.hight = 172.5;
        g1.weight = 54;
        g1.color = "貌美如花";
        System.out.println(g1.name);
        System.out.println(g1.hight);
        System.out.println(g1.weight);
        System.out.println(g1.color);


        Girl g2 = new Girl("苍井空",168,48,"肤白貌美大长腿");
        System.out.println(g2.name);
        System.out.println(g2.hight);
        System.out.println(g2.weight);
        System.out.println(g2.color);

        Girl g3 = new Girl("小泽玛利亚",165.1,48.6,"丰满");
        System.out.println(g3.name);
        System.out.println(g3.hight);
        System.out.println(g3.weight);
        System.out.println(g3.color);

    }
}
